package com.tjh.spring5.aopanno;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * Create by koala on 2021-02-17
 * day28：设置增强类优先级
 */

@Component
@Aspect
@Order(1)//day28：设置增强类优先级，数字类型值越小优先级越高
public class PersonProxy {
    //后置通知（返回通知）
    @Before(value = "execution(* com.tjh.spring5.aopanno.User.add(..))")
    public void before() {
        System.out.println("Person Before.........");
    }
}
